<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.console.servlets.trading.xlb.cylj.UpdateCylj"%>
<%@page import="com.blockchain.console.servlets.trading.xlb.cylj.DeleteCylj"%>
<%@page import="com.blockchain.console.servlets.trading.xlb.cylj.AddCylj"%>
<%@page import="com.blockchain.console.servlets.trading.xlb.cylj.CyljList"%>
<%@page import="com.blockchain.console.service.trading.entity.CyljEntity"%>
<%@page import="com.blockchain.console.service.trading.entity.XlbEntity"%>
<%@page import="com.sun.org.apache.bcel.internal.generic.ISUB"%>
<%@page import="com.blockchain.common.enums.IsPass"%>
<html>
<head>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<%
CURRENT_CATEGORY="JYGL";
CURRENT_SUB_CATEGORY="XLBGL";
int bid=(int)request.getAttribute("bid"); 
if(bid<=0){
	bid=IntegerParser.parse(request.getParameter("bid"));
}
PagingResult<CyljEntity>  cyljs= (PagingResult<CyljEntity>)request.getAttribute("cyljs");
CyljEntity[] xlbArray = cyljs.getItems();
%>
<body>
	<%@include file="/WEB-INF/include/header.jsp"%>
	<div class="w_main">
		<div class="main clearfix">
			<div class="wrap">
			<form action="<%=controller.getURI(request,CyljList.class) %>" method="post">
			<input type="hidden" name="bid" value="<%=bid%>">
				<div class="r_main">
					<div class="home_main">
						<div class="box box1 mb15">
							<div class="atil">
                    		<h3>常用链接管理</h3>
                  			</div>
						</div>
						<div class="box box1 mb15">
							<div class="clear"></div>
							<div class="con">
							<div class="admin_input admin_pb">
						 		<div class="mt10">
						 			<%if (blockchainSession.isAccessableResource(AddCylj.class)) {%>
									<a href="<%=controller.getURI(request, AddCylj.class)%>?bid=<%=bid%>" class="btn3 mr10"><span class="ico3"></span>添加</a>
									<%}%>
						 			<div class="clear"></div>
								</div>
						    </div>
						</div>
						</div>
						<div>
							<table width="100%" border="0" cellspacing="0" cellpadding="3" class="yhgl_table tc">
						<tr class="hsbg">
                          <td>ID</td>
                          <td>排序</td>
                          <td>名称</td>
                          <td>链接</td>
                          <td>是否显示</td>
                          <td>操作</td>
                        </tr>
						<%
                        if (xlbArray != null) {for (int i =0;i<xlbArray.length;i++){CyljEntity x=xlbArray[i];if (x == null) {continue;}
                        %>
                        <tr class="dhsbg">
                          <td><%=x.id%></td>
                          <td><%=x.px%></td>
                          <td><%StringHelper.filterHTML(out, x.mc);%></td>
                          <td><%StringHelper.filterHTML(out, x.dz);%></td>
                          <td><%=x.sfxs.getName()%></td>
                         <td>
                          <%if (blockchainSession.isAccessableResource(UpdateCylj.class)) {%>
                          	<span class="blue"><a href="<%=controller.getURI(request,UpdateCylj.class)%>?id=<%=x.id%>" class="mr10">编辑</a></span>
                          <%}%>
                       <%if (blockchainSession.isAccessableResource(DeleteCylj.class)){%>
		                     <span class="blue"><a href="javascript:void(0)" onclick="load('<%=controller.getURI(request, DeleteCylj.class)%>?id=<%=x.id%>&bid=<%=x.bid%>')" class="mr10">删除</a></span>
                        <%}%> 
                          </td>
						</tr>
								<%}}%>
							</table>
						</div>
							<%AbstractConsoleServlet.rendPagingResult(out, cyljs); %>
						<div class="box2 clearfix"></div>
					</div>
				</div>
				</form>
			</div>
			<%@include file="/WEB-INF/include/left.jsp" %>
		</div>
	</div>
	<%@include file="/WEB-INF/include/footer.jsp"%>
	<%@include file="/WEB-INF/include/script.jsp"%>
	<%@include file="/WEB-INF/include/datepicker.jsp"%>
	<script type="text/javascript">
		function load(url)
		{
			if (!window.confirm("你确定删除吗？")) {
				return;
			}
			location.href=url;
		}	
		</script>
</body>
</html>